package P12.T02;

public class T02 {

    public static void main(String[] args) {
        System.out.println(myMax('c','d'));
        Cat c1=new Cat(),c2=new Cat();
        c1.setWeight(10);
        c2.setWeight(20);
        System.out.println(myMax(c1,c2));


    }

    public static <T extends Comparable<T>> T myMax(T a, T b) {
        return a.compareTo(b)>0?a:b;
    }
    public static double max(double a, double b) {
        return a > b ? a : b;
    }
}
class Cat implements Comparable<Cat>{
    private int weight;

    public int getWeight() {
        return weight;
    }

    public void setWeight(int weight) {
        this.weight = weight;
    }

    @Override
    public int compareTo(Cat o) {
        return 0;
    }
}